package com.jiai.cloud.feign;


import com.jiai.cloud.entity.TGoodsSpac;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


@FeignClient("authentication")
public interface GoodsSpacAPI {

     //增
    @RequestMapping(value="/api/v1/goodsSpac/addGoodsSpac")
    Object addGoodsSpac(@RequestBody TGoodsSpac tGoodsSpac);

    //删
    @RequestMapping(value="/api/v1/goodsSpac/delete/{id}")
    Object deleteById(@PathVariable("id") Integer id);

    //查
    @RequestMapping("/api/v1/goodsSpac/findById/{id}")
    Object selectById(@PathVariable("id") Integer id);

    @RequestMapping(value = "/api/v1/goodsSpac/findByAll",method= RequestMethod.POST)
    Object selectPage();

    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/goodsSpac/edit")
    Object edit(@RequestBody TGoodsSpac tGoodsSpac);

    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/goodsSpac/edit")
    Object insertOrUpdateBatch(@RequestBody List<TGoodsSpac> list);

}
